package com.woniu.controller;

import com.woniu.domain.User;
import com.woniu.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * @author: ljy  <br/>
 * Date: 2021/6/8:12:15  <br/>
 * Description:用户控制器
 */

@RestController
@RequestMapping("/user/")
public class UsersController {
    @Autowired(required = false)
    UsersService usersService;
//
//    public List<User> queryUserList(List<String> userNames){
//        return usersService.getUserByName(userNames);
//    }
    @RequestMapping("upNews")
    public int updateUserNews(@RequestBody User user){
        return usersService.updateUserNews(user);
    }

}
